package com.exonline.commons.entity;
/**
 * @desc 菜单实体类
 * @author hbrj
 */
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Menu {
    private String id;//菜单id
    private String mname;//菜单名
    private String murl;//菜单url
    private String mparent;//菜单的父级菜单
    private List<Menu> subMenus = new ArrayList<>(); //菜单的子菜单列表
    public List<Menu> addSubMenus (Menu menu) {
        subMenus.add(menu);
        return subMenus;
    }
}
